<extend name="Public/List/Common"/>
<block name="pageHeader">
    <div class="bjui-pageHeader">
        <form id="pagerForm" data-toggle="ajaxsearch" action="__ACTION__" method="post">
            <label>筛选:</label>
            <select name="groupId" data-toggle="selectpicker">
                <option value="">全部</option>
                <volist name="Think.config.CONFIG_GROUP_LIST" id="groupName" key="groupId">
                    <option value="{$groupId}"
                    <if condition="$groupId EQ $_REQUEST['groupId'] ">selected</if>
                    >{$groupName}</option>
                </volist>
                <option value="0">其他</option>
            </select>
            <label>关键词：</label>
            <input value="{$_REQUEST['name']}" name="name" class="form-control" size="15"/>
            <button type="submit" class="btn-default" data-icon="search">查询</button>

            <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);"
               data-icon="undo">清空查询</a>

            <div class="pull-right">
                <a href="{:U('add')}" class="btn btn-green" data-toggle="dialog" data-width="600" data-height="450"
                   data-id="dialog-mask" data-mask="true" data-icon="plus">新增</a>
            </div>
        </form>
    </div>
</block>
<block name="pageContent">
    <div class="bjui-pageContent tableContent">
        <table data-toggle="tablefixed" data-width="100%" data-layout-h="0" data-nowrap="true">
            <thead>
            <tr>
                <th data-order-field="id">编号</th>
                <th>分类</th>
                <th>名称</th>
                <th>标题</th>
                <th>类型</th>
                <th data-order-field="sort">排序</th>
                <th data-order-field="create_time">新增时间</th>
                <th data-order-field="update_time">修改时间</th>
                <th>状态</th>
                <th>编辑</th>
            </tr>
            </thead>
            <tbody>

            <volist id="v" name="configList">
                <tr>
                    <td>{$v.id}</td>
                    <td>
                        <volist name="Think.config.CONFIG_GROUP_LIST" id="group">
                            <if condition="$key EQ $v['group'] ">{$group}</if>
                        </volist>
                    </td>
                    <td>{$v.name}</td>
                    <td>{$v.title}</td>
                    <td>
                        <volist name="Think.config.CONFIG_TYPE_LIST" id="type">
                            <if condition="$key EQ $v['type'] ">{$type}</if>
                        </volist>
                    </td>
                    <td>{$v.sort}</td>
                    <td>{:date('Y-m-d H:i:s', $v['create_time'])}</td>
                    <td>{:date('Y-m-d H:i:s', $v['update_time'])}</td>
                    <td>{$v.status}</td>
                    <td>
                        <a href="{:U('edit?id='.$v['id'])}" class="btn btn-green" data-toggle="dialog" data-width="600"
                           data-height="450" data-id="dialog-mask" data-mask="true">编辑</a>
                        <a href="{:U('toggleStatus?id='.$v['id'])}" class="btn btn-{$v['status']==0?'blue':'red'}"
                           data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">{$v['status']==0?'启用':'禁用'}</a>
                        <a href="{:U('del?id='.$v['id'])}" class="btn btn-red row-del" data-toggle="doajax"
                           data-confirm-msg="确定要删除该行信息吗？">删</a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
    </div>
</block>